package com.lcb.flink.source;

import org.apache.flink.connector.jdbc.dialect.MySQLDialect;

import java.util.Optional;

/**
 * @ClassName ImpalaDialect
 * @Deacription TODO
 * @Author wushumin
 * @Date 2021-08-05 18:05
 * @Version 1.0
 **/
public class ImpalaDialect extends MySQLDialect {

    @Override
    public boolean canHandle(String url) {
        return url.startsWith("jdbc:impala:");
    }

    @Override
    public Optional<String> defaultDriverName() {
        return Optional.of("com.cloudera.impala.jdbc41.Driver");
    }

    @Override
    public String dialectName() {
        return "Impala";
    }
}
